#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>

#define FIFO_FILE "mypipe"

int main()
{
    int fd = open(FIFO_FILE,O_RDONLY);

    while (true)
    {
        char message[80];
        read(fd, message, sizeof message);
        printf("A say:%s\n", message);
    }
    close(fd);
    return 0;
}